const Mock = require('mockjs')
const { XHR2ExpressReqWrap } = require('./utils')
const home = require('./routes/home')
const user = require('./routes/user')

const mocks = [
    ...home,
    ...user
]
// console.log(mocks)

for (const i of mocks) {
    Mock.mock(new RegExp(i.url), i.type || 'get', XHR2ExpressReqWrap(i.response))
}